Many real world domains require the representation of a measure of uncertainty. The most common such representation is probability, and the combination of probability with logic programs has given rise to the field of Probabilistic Logic Programming (PLP), leading to languages such as the Independent Choice Logic, Logic Programs with Annotated Disjunctions (LPADs), Problog, PRISM and others. These languages share a similar distribution semantics, and methods have been devised to translate programs between these languages. \udThe complexity of computing the probability of queries to these\udgeneral PLP programs is very high due to the need to combine the\udprobabilities of explanations that may not be exclusive. As one\udalternative, the PRISM system reduces the complexity of query\udanswering by restricting the form of programs it can evaluate. As an entirely different alternative, Possibilistic Logic Programs adopt a simpler metric of uncertainty than probability.\udEach of these approaches -- general PLP, restricted PLP, and\udPossibilistic Logic Programming -- can be useful in different domains depending on the form of uncertainty to be represented, on the form of programs needed to model problems, and on the scale of the problems to be solved. In this paper, we show how the PITA system, which originally supported the general PLP language of LPADs, can also efficiently support restricted PLP and Possibilistic Logic Programs.\udPITA relies on tabling with answer subsumption and consists of a\udtransformation along with an API for library functions that interface\udwith answer subsumption. We show that, by adapting its transformation and library functions, PITA can be parameterized to PITA(IND,EXC) which supports the restricted PLP of PRISM, including optimizations that reduce non-discriminating arguments and the computation of Viterbi paths. Furthermore, we show PITA to be competitive with PRISM for complex queries to Hidden Markov Model examples, and sometimes much faster.\udWe further show how PITA can be parameterized to PITA(COUNT) which computes the number of different explanations for a subgoal, and to PITA(POSS) which scalably implements Possibilistic Logic Programming.\udPITA is a supported package in version 3.3 of XSB.
展开▼